
const sass = require('sass')
module.exports = function (grunt) {

    grunt.initConfig({
        babel: {
            options: {
                sourceMap: true,
                presets: ['@babel/preset-env']
            },
            dist: {
                files: {
                    src: ['src/assets/scripts/main.js'], //所有js文件
                    dest: 'dist'  //输出到此目录下
                }
            }
        },
        sass: {
            options: {
                implementation:sass
            },
            main: {
                files: {
                    '../../dist/assets/styles/main.css':'src/assets/styles/main.scss'
                }
            }
        }
    });

    grunt.registerTask('default', ['sass']);


    require('load-grunt-tasks')(grunt);
};